// -*- coding: utf-8-unix; fill-column: 95; -*-

///////////////////////////////////////////////////////////////////////////////////////////////
//
// This file is part of Escapade Trip Planner, a social web application for creating and
// sharing motorcycle roadmaps.
//
// Copyright © 2011, Pierre-François Gomez <pef.gomez@gmail.com>
//
// Escapade Trip Planner is free software: you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the Free Software Foundation, either
// version 3 of the License, or (at your option) any later version.
//
// Escapade Trip Planner is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with Escapade Trip
// Planner. If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////////////////////////

Ext.application({
    name: 'Escapade',
    appFolder: 'app',

    controllers: ['RoadmapBrowser',
                  'RoadmapEditor'],

    launch: function()
    {
        console.log("[app] launching...");

        Ext.create('Ext.container.Viewport', {

            layout: 'border',
            renderTo: Ext.getBody(),

            items: [{
                region: 'west',
                flex: 0.3,
                xtype: 'roadmapbrowser',
                collapsible: true,
                split: true,
            }, {
                region: 'center',
                flex: 0.7,
                xtype: 'tabpanel',
                activeTab: 0,
                items: [{
                    title: 'Welcome',
                    closable: true,
                    html: 'welcome'
                }, {
                    title: 'Dummy Roadmap 1',
                    xtype: 'roadmapeditor'
                }, {
                    title: 'Dummy Roadmap 2',
                    xtype: 'roadmapeditor'
                }, {
                    title: 'Dummy Roadmap 3',
                    xtype: 'roadmapeditor'
                }],
            }]
        });

        console.log("[app] launched");
    }
});
